package com.ysd.lis.controller.bac;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.bac.BacCulBottle;
import com.ysd.lis.service.bac.BacCulBottleService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 培养瓶培养架 前端控制器
 * </p>
 *
 * @author cfz
 * @since 2024-08-21
 */
@RestController
@RequestMapping("/bac-cul-bottle")
public class BacCulBottleController extends BaseController {
    @Autowired
    BacCulBottleService bacCulBottleService;

    @ApiOperation("查询")
    @GetMapping("/findBacCulBottleList")
    public Result findBacCulBottleList(BacCulBottle bacCulBottle) {
        return bacCulBottleService.findBacCulBottleList(bacCulBottle);
    }

    @ApiOperation("增加")
    @PostMapping("/addBacCulBottle")
    public Result addBacCulBottle(@RequestBody BacCulBottle bacCulBottle) {
        return bacCulBottleService.addBacCulBottle(bacCulBottle);
    }

    @ApiOperation("删除")
    @PostMapping("/deleteBacCulBottle")
    public Result deleteBacCulBottle(@RequestBody BacCulBottle bacCulBottle) {
        return bacCulBottleService.deleteBacCulBottle(bacCulBottle);
    }

    @ApiOperation("修改")
    @PostMapping("/updateBacCulBottle")
    public Result updateBacCulBottle(@RequestBody BacCulBottle bacCulBottle) {
        return bacCulBottleService.updateBacCulBottle(bacCulBottle);
    }

    @ApiOperation("根据报告单元查询血培养培养架")
    @GetMapping("/findOneByRptGroup")
    public BacCulBottle findOneByRptGroup(@RequestParam String rptGroup) {
        return bacCulBottleService.findOneByRptGroup(rptGroup);
    }
}
